//
//  FKKeywordCell.m
//  HappyTest
//
//  Created by Macbook Pro on 2019/1/21.
//  Copyright © 2019 Macbook Pro. All rights reserved.
//

#import "FKKeywordCell.h"
#import "FKSearchKeyword.h"

@interface FKKeywordCell ()

@property (nonatomic, weak) UILabel *titleLabel;

@end

@implementation FKKeywordCell

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        UILabel *titleLabel = [UILabel fk_labelWithFont:fk_adjustFont(12) textColor:fkColor999999 textAlignment:NSTextAlignmentCenter];
        [self.contentView addSubview:titleLabel];
        self.titleLabel = titleLabel;
        titleLabel.backgroundColor = [UIColor fk_colorWithHex:0xf5f5f5];
        [titleLabel fk_viewCornerRadius:fk_adjustW(13) borderWidth:0 borderColor:nil];
        [titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.offset(0);
        }];
    }
    return self;
}

- (void)setData:(FKSearchKeyword *)data
{
    _data = data;
    
    self.titleLabel.text = data.search_content;
}

@end
